<!DOCTYPE htcopyeadcml>
<html>

	<head>
		<meta charset="UTF-8">
		<title>ssl证书安装方法</title>
		<style type="text/css">

		</style>
		<link rel="stylesheet" type="text/css" href="css/css.css"/>
	</head>

<body>
<div id="box">
	正要安装证书的域名：
<input type="text" name="" class="input" value="" autofocus placeholder="请输入正在修改的域名" /><br /><br />
<a href="#rgdmdm" id="uedmdm">最后文件夹指向：</a>
<input type="text" name="" class="rxtm" value=""/> <span style="color: red;">（广告页面默认</span> mf.navlan.cn ,<span style="color: red;">审核页面</span>修改与域名一致）
<span class="success">复制成功！</span>
<p><span class="red">（第一步）</span><span class="textmwpw">cd /data/svn/mystatic</span> <button class="copyeadc">复制</button> 备注：跳转到SVN的目录 </p>

<p><span class="red">（第二步）</span><span class="textmwpw">svn co svn://47.93.2.51/mystatic/<span class="domain_name">mf.navlan.cn</span> </span><button class="copyeadc">复制</button>&nbsp;&nbsp;备注：新文件夹在SVN的更新————（后面的**.huataicaiyin.com改成直接落地页的文件夹名）</p>

<p><span class="red">（第三步）</span><span class="textmwpw">cd /etc/nginx/certs</span> <button class="copyeadc">复制</button> 配置SSL证书路径</p>
<p>然后，点击图按钮添加文件</p>
<img src="1.png"/>
<p><span class="red">（第四步）</span> <span class="textmwpw">vim /etc/nginx/conf.d/virtual.conf</span> <button class="copyeadc">复制</button>备注：修改域名或修改服务器配置 </p>
<p><span class="red">（第五步）</span>#ssl证书配置 以下所有都需要复制，记得修改域名 6处 复制下面粘贴 《需要安装证书情况——第四步》</p>
<p><b>输入以下内容</b></p>
<div class="ssl">
<button class="copyeadc">复制</button>
<br />
<div class="textmwpw">
server {<br />
listen 80;<br />
server_name  <span class="domain_name">mf.navlan.cn</span>;<span class="hint"></span><br />
location / {<br />
root   /data/svn/mystatic/<span class="domain_name">mf.navlan.cn</span>;<span class="hint"></span><br />
index  index.html index.htm;<br />
rewrite ^(.*)$ https://$host$1 permanent;<br />
}<br />
}<br />

#ssl证书配置<br />

server {<br />
listen  443;<br />
server_name  <span class="domain_name">mf.navlan.cn</span>;<span class="hint"></span><br />
ssl  on;<br />
ssl_certificate certs/<span class="domain_name">mf.navlan.cn</span>.crt;<span class="hint2"></span><br />
ssl_certificate_key certs/<span class="domain_name">mf.navlan.cn</span>.key;<span class="hint2"> </span><br />
ssl_session_timeout 5m;<br />
ssl_protocols TLSv1 TLSv1.1 TLSv1.2;<br />
ssl_ciphers HIGH:!RC4:!MD5:!aNULL:!eNULL:!NULL:!DH:!EDH:!EXP:+MEDIUM;<br />
ssl_prefer_server_ciphers   on;<br />
   #新后台接口 （审核页面不写接口也行）<br />
location ^~ /api {<br />
proxy_set_header X-Real-IP  $remote_addr;<br />
proxy_set_header   X-Forwarded-For  $proxy_add_x_forwarded_for;<br />
proxy_set_header   Host                   $proxy_host;<br />
proxy_set_header   X-NginX-Proxy    true;<br />
proxy_set_header   Connection "";<br />
proxy_pass   http://cs.siiji.cn;<br />
client_max_body_size   5m; <br />
}<br />
location / {<br />
root   /data/svn/mystatic/<a href="#uedmdm"><span class="domain_rxtm"  id="rgdmdm" style="color: red;">mf.navlan.cn</span></a>;<span class="hint3"></span><br />
index  index.html index.htm;<br />
}<br />
}<br />

<hr />


<!--<p>server {</p>
<p>listen 80;</p>
<p>server_name <span class="domain_name">mf.navlan.cn</span>;<span class="hint"></span></p>
<p>location / {</p>
<p>root /data/svn/mystatic/<span class="domain_name">mf.navlan.cn</span>;<span class="hint"></span></p>
<p>index&nbsp;index.html&nbsp;index.htm;</p>
<p>rewrite&nbsp;^(.*)$&nbsp;https://$host$1&nbsp;permanent;</p>
<p>}</p>
<p>}</p>
<p>#ssl证书配置</p>

<p>server&nbsp;{</p>
<p>listen&nbsp;443;</p>
<p>server_name&nbsp;<span class="domain_name">mf.navlan.cn</span>;<span class="hint"></span></p>
<p>ssl&nbsp;on;</p>
<p>ssl_certificate&nbsp;certs/<span class="domain_name">mf.navlan.cn</span>.pem;<span class="hint2"></span></p>
<p>ssl_certificate_key&nbsp;certs/<span class="domain_name">mf.navlan.cn</span>.key;<span class="hint2"> </span></p>
<p>ssl_session_timeout&nbsp;5m;</p>
<p>ssl_protocols TLSv1&nbsp;TLSv1.1&nbsp;TLSv1.2;</p>
<p>ssl_ciphers HIGH:!RC4:!MD5:!aNULL:!eNULL:!NULL:!DH:!EDH:!EXP:+MEDIUM;</p>
<p>ssl_prefer_server_ciphers&nbsp;&nbsp;on;</p>
<p>#新后台接口 （审核页面不写接口也行）</p>
<p>location&nbsp;^~ /api {</p>
<p>proxy_set_header &nbsp;&nbsp;X-Real-IP &nbsp;&nbsp;&nbsp;$remote_addr;</p>
<p>proxy_set_header &nbsp;&nbsp;X-Forwarded-For&nbsp;&nbsp;$proxy_add_x_forwarded_for;</p>
<p>proxy_set_header &nbsp;&nbsp;Host &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$proxy_host;</p>
<p>proxy_set_header &nbsp;&nbsp;X-NginX-Proxy &nbsp;&nbsp; &nbsp;true;</p>
<p>proxy_set_header &nbsp;&nbsp;Connection "";</p>
<p>proxy_pass&nbsp;http://cs.siiji.cn;</p>
<p>client_max_body_size&nbsp;5m; </p>
<p>}</p>
<p>location / {</p>
<p>root &nbsp;&nbsp;/data/svn/mystatic/<a href="#uedmdm"><span class="domain_rxtm"  id="rgdmdm" style="color: red;">mf.navlan.cn</span></a>;<span class="hint3"></span></p>
<p>index &nbsp;&nbsp;index.html &nbsp;&nbsp;index.htm;</p>
<p>}</p>
<p>}</p>-->
</div>
</div>
<p>nginx -t 查看是否配置成功 （ 第六步）</p>
<p><span class="textmwpw"><b>nginx -s reload</b></span><button class="copyeadc">复制</button> 备注：加载保存配置文件 （ 第七步）</p>
<div style="width: 100%;height: 600px;">
	
</div>
</div>
</body>
	<script src="js/jquery-3.3.1.js" type="text/javascript" charset="utf-8"></script>
	<script src="js/clipboard.min_1.js" type="text/javascript" charset="utf-8"></script>
<script src="js/js.js" type="text/javascript" charset="utf-8"></script>

</html>
